﻿using System;
using WorkflowTool.Demo;

namespace WorkflowTool
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            BossX bossX = new BossX();
            bossX.Name = "X";
            BossC bossC = new BossC();
            bossC.Name = "C";
            BossB bossB = new BossB();
            bossB.Name = "B";
            bossB.Next(bossC);
            BossA bossA = new BossA();
            bossA.Name = "A";
            //工作流
            var Context = new WorflowContext<object>();
            bossA.AddFilters(a =>
            {
                a.Add<MyFilter>();
            }).Next(bossB).Next(bossB).Start(Context).Map(context => {
                bossX.Start(context);
                bossX.Start(context);
            });
            Console.ReadLine();
        }
    }
}
